<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>简单的计算器</title>
  <script src="../../框架/vue.js"></script>
</head>
<body>
<div id="app">
  <input type="text" placeholder="请输入第一个数字：" v-model="num1"><br>
  <input type="text" placeholder="请输入第二个数字：" v-model="num2">
  <p>结果是:{{add}}</p>
</div>
<script>
  let a = new Vue({
    el:'#app',
    data(){
      return {
        num1:0,
        num2:0
      }
    },
    computed:{
      add:function (){
        return parseInt(this.num1) + parseInt(this.num2)
      }
    }
  })
</script>
</body>
</html>